<?php $this->include('layouts/default/header', $site) ?>
<style>
  html, body {
    height: 100%;
  }

  @media (max-width: 500px) {
    .main {
      padding-top: 8rem;
    }

    header .navbar.navbar-fixed-top {
      background: linear-gradient(150deg, #281483 15%, #8f6ed5 70%, #d782d9 94%);
    }
  }

</style>

<header class="">
  <nav class="navbar navbar-white navbar-fixed-top" role="navigation">
    <div class="container">
      <div class="navbar-header page-scroll">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/" title="<?php echo $site['title']; ?>"><?php echo $site['title']; ?></a>
      </div>
      <div id="navbar" class="navbar-collapse collapse">
        <ul class="nav navbar-nav navbar-right">
          <li class="active"><a class="page-scroll" href="javascript:">首页</a></li>
          <li class=""><a class="page-scroll" href="/tag/<?php echo array_key_first($data) ?>">标签列表</a></li>
        </ul>
      </div>
    </div>
  </nav>
</header>

<div class="main mb">
  <div class="container z-top">
    <div class="row">
      <div class="col-md-6 col-md-offset-3">
        <form class="" action="/search" onsubmit="return checkForm(this)">
          <div class="input-group input-group-lg has-white">
            <input type="text" class="form-control" placeholder="Search for..." name="keywords">
            <span class="input-group-btn"><button class="btn btn-default" type="submit">Go!</button></span>
          </div>
        </form>
      </div>
      <div class="col-md-6 col-md-offset-3 mt index-tag-list">
        <?php
        $lable_colour = ['success', 'danger', 'primary', 'warning', 'pupel', 'secend', 'third', 'dark', 'fourth'];
        foreach ($data as $tid => $tag) {
          echo <<<EOT
<a href="/tag/{$tid}">
          <span class="label label-{$lable_colour[array_rand($lable_colour)]}">{$tag}</span>
        </a>
EOT;
        }
        ?>
      </div>
    </div>

  </div>
  <div class="circle">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
  <div class="shape">
    <svg x="0" y="0" viewBox="0 0 2560 100" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
      <polygon class="fill-white" points="2560 0 2560 100 0 100"></polygon>
    </svg>
  </div>
</div>

<?php $this->include('layouts/default/footer') ?>
